package com.floreantpos.model.base;

import java.io.Serializable;

/**
 * This is an object that contains data related to the RESTAURANT table. Do not
 * modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class table="RESTAURANT"
 */
public abstract class BaseRestaurant implements Comparable, Serializable {

  public static String REF = "Restaurant";
  public static String PROP_CURRENCY_NAME = "currencyName";
  public static String PROP_CAPACITY = "capacity";
  public static String PROP_ADDRESS_LINE3 = "addressLine3";
  public static String PROP_CURRENCY_SYMBOL = "currencySymbol";
  public static String PROP_TELEPHONE = "telephone";
  public static String PROP_ADDRESS_LINE2 = "addressLine2";
  public static String PROP_ADDRESS_LINE1 = "addressLine1";
  public static String PROP_AUTO_DRAWER_PULL_ENABLE = "autoDrawerPullEnable";
  public static String PROP_DRAWER_PULL_MIN = "drawerPullMin";
  public static String PROP_TABLES = "tables";
  public static String PROP_NAME = "name";
  public static String PROP_DRAWER_PULL_HOUR = "drawerPullHour";
  public static String PROP_ID = "id";
  public static String PROP_SAVE_GUESTS_PER_TABLE = "saveGuestsPerTable";
  public static String PROP_SAVE_GUEST_NAME = "saveGuestName";
  public static String PROP_GRATUITY_RATE = "gratuityRate";
  public static String PROP_AUTO_GEN_TICKET = "autoGenTicket";
  public static String PROP_ECF_OK = "ecfOk";
  public static String PROP_TEST_SYSTEM = "testSystem";
  public static String PROP_MSG_ECF = "msgEcf";
  public static String PROP_SAVE_TAX_ID = "saveTaxId";
  public static String PROP_CNPJ = "cnpj";
  public static String PROP_IE = "ie";
  public static String PROP_CCM = "ccm";

  // constructors
  public BaseRestaurant() {
    initialize();
  }

  /**
   * Constructor for primary key
   */
  public BaseRestaurant(java.lang.Integer id) {
    this.setId(id);
    initialize();
  }

  protected void initialize() {
  }

  private int hashCode = Integer.MIN_VALUE;

  // primary key
  private java.lang.Integer id;

  // fields
  private java.lang.String name;
  private java.lang.String addressLine1;
  private java.lang.String addressLine2;
  private java.lang.String addressLine3;
  private java.lang.String telephone;
  private java.lang.Integer capacity;
  private java.lang.Integer tables;
  private java.lang.Boolean autoDrawerPullEnable;
  private java.lang.Integer drawerPullHour;
  private java.lang.Integer drawerPullMin;
  private java.lang.String currencyName;
  private java.lang.String currencySymbol;
  private java.lang.Boolean saveGuestsPerTable;
  private java.lang.Boolean saveGuestName;
  private java.lang.Double gratuityRate;
  private java.lang.Boolean autoGenTicket;
  private java.lang.Boolean ecfOk;
  private java.lang.Boolean testSystem;
  private java.lang.String msgEcf;
  private java.lang.Boolean saveTaxId;
  private java.lang.String cnpj;
  private java.lang.String ie;
  private java.lang.String ccm;  

  /**
   * Return the unique identifier of this class
   *
   * @hibernate.id generator-class="assigned" column="ID"
   */
  public java.lang.Integer getId() {
    return id;
  }

  /**
   * Set the unique identifier of this class
   *
   * @param id the new ID
   */
  public void setId(java.lang.Integer id) {
    this.id = id;
    this.hashCode = Integer.MIN_VALUE;
  }

  /**
   * Return the value associated with the column: NAME
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Set the value related to the column: NAME
   *
   * @param name the NAME value
   */
  public void setName(java.lang.String name) {
    this.name = name;
  }
  
  /**
   * Return the value associated with the column: MSG_ECF
   */
  public java.lang.String getMsgEcf() {
    return msgEcf;
  }

  /**
   * Set the value related to the column: MSG_ECF
   *
   * @param msgEcf the MSG_ECF value
   */
  public void setMsgEcf(java.lang.String msgEcf) {
    this.msgEcf = msgEcf;
  }  

  /**
   * Return the value associated with the column: ADDRESS_LINE1
   */
  public java.lang.String getAddressLine1() {
    return addressLine1;
  }

  /**
   * Set the value related to the column: ADDRESS_LINE1
   *
   * @param addressLine1 the ADDRESS_LINE1 value
   */
  public void setAddressLine1(java.lang.String addressLine1) {
    this.addressLine1 = addressLine1;
  }

  /**
   * Return the value associated with the column: ADDRESS_LINE2
   */
  public java.lang.String getAddressLine2() {
    return addressLine2;
  }

  /**
   * Set the value related to the column: ADDRESS_LINE2
   *
   * @param addressLine2 the ADDRESS_LINE2 value
   */
  public void setAddressLine2(java.lang.String addressLine2) {
    this.addressLine2 = addressLine2;
  }

  /**
   * Return the value associated with the column: ADDRESS_LINE3
   */
  public java.lang.String getAddressLine3() {
    return addressLine3;
  }

  /**
   * Set the value related to the column: ADDRESS_LINE3
   *
   * @param addressLine3 the ADDRESS_LINE3 value
   */
  public void setAddressLine3(java.lang.String addressLine3) {
    this.addressLine3 = addressLine3;
  }

  /**
   * Return the value associated with the column: TELEPHONE
   */
  public java.lang.String getTelephone() {
    return telephone;
  }

  /**
   * Set the value related to the column: TELEPHONE
   *
   * @param telephone the TELEPHONE value
   */
  public void setTelephone(java.lang.String telephone) {
    this.telephone = telephone;
  }

  /**
   * Return the value associated with the column: CAPACITY
   */
  public java.lang.Integer getCapacity() {
    return capacity == null ? Integer.valueOf(0) : capacity;
  }

  /**
   * Set the value related to the column: CAPACITY
   *
   * @param capacity the CAPACITY value
   */
  public void setCapacity(java.lang.Integer capacity) {
    this.capacity = capacity;
  }

  /**
   * Return the value associated with the column: TABLES
   */
  public java.lang.Integer getTables() {
    return tables == null ? Integer.valueOf(0) : tables;
  }

  /**
   * Set the value related to the column: TABLES
   *
   * @param tables the TABLES value
   */
  public void setTables(java.lang.Integer tables) {
    this.tables = tables;
  }
  
  /**
   * Return the value associated with the column: CNPJ
   */
  public java.lang.String getCnpj() {
    return cnpj;
  }

  /**
   * Set the value related to the column: CNPJ
   *
   * @param cnpj the CNPJ value
   */
  public void setCnpj(java.lang.String cnpj) {
    this.cnpj = cnpj;
  }
  
  /**
   * Return the value associated with the column: IE
   */
  public java.lang.String getIe() {
    return ie;
  }

  /**
   * Set the value related to the column: IE
   *
   * @param ie the IE value
   */
  public void setIe(java.lang.String ie) {
    this.ie = ie;
  }
  
  /**
   * Return the value associated with the column: CCM
   */
  public java.lang.String getCcm() {
    return ccm;
  }

  /**
   * Set the value related to the column: CCM
   *
   * @param ccm the CCM value
   */
  public void setCcm(java.lang.String ccm) {
    this.ccm = ccm;
  }  

  /**
   * Return the value associated with the column: SAVEGUESTSPERTABLE
   */
  public java.lang.Boolean isSaveGuestsPerTable() {
    return saveGuestsPerTable == null ? Boolean.FALSE : saveGuestsPerTable;
  }

  /**
   * Set the value related to the column: SAVEGUESTSPERTABLE
   *
   * @param saveGuestsPerTable the SAVEGUESTSPERTABLE value
   */
  public void setSaveGuestsPerTable(java.lang.Boolean saveGuestsPerTable) {
    this.saveGuestsPerTable = saveGuestsPerTable;
  }

  /**
   * Return the value associated with the column: SAVEGUESTNAME
   */
  public java.lang.Boolean isSaveGuestName() {
    return saveGuestName == null ? Boolean.FALSE : saveGuestName;
  }

  /**
   * Set the value related to the column: SAVEGUESTNAME
   *
   * @param saveGuestName the SAVEGUESTNAME value
   */
  public void setSaveGuestName(java.lang.Boolean saveGuestName) {
    this.saveGuestName = saveGuestName;
  }
  
  /**
   * Return the value associated with the column: SAVETAXID
   */
  public java.lang.Boolean isSaveTaxId() {
    return saveTaxId == null ? Boolean.FALSE : saveTaxId;
  }

  /**
   * Set the value related to the column: SAVETAXID
   *
   * @param saveTaxId the SAVETAXID value
   */
  public void setSaveTaxId(java.lang.Boolean saveTaxId) {
    this.saveTaxId = saveTaxId;
  }  

  /**
   * Return the value associated with the column: AUTOGENTICKET
   */
  public java.lang.Boolean isAutoGenTicket() {
    return autoGenTicket == null ? Boolean.FALSE : autoGenTicket;
  }

  /**
   * Set the value related to the column: AUTOGENTICKET
   *
   * @param autoGenTicket the AUTOGENTICKET value
   */
  public void setAutoGenTicket(java.lang.Boolean autoGenTicket) {
    this.autoGenTicket = autoGenTicket;
  }
  
   /**
   * Return the value associated with the column: TESTSYSTEM
   */
  public java.lang.Boolean isTestSystem() {
    return testSystem == null ? Boolean.TRUE : testSystem;
  }

  /**
   * Set the value related to the column: TESTSYSTEM
   *
   * @param testSystem the TESTSYSTEM value
   */
  public void setTestSystem(java.lang.Boolean testSystem) {
    this.testSystem = testSystem;
  }  
  
   /**
   * Return the value associated with the column: ECFOK
   */
  public java.lang.Boolean isEcfOk() {
    return ecfOk == null ? Boolean.FALSE : ecfOk;
  }

  /**
   * Set the value related to the column: ECFOK
   *
   * @param ecfOk the ECFOK value
   */
  public void setEcfOk(java.lang.Boolean ecfOk) {
    this.ecfOk = ecfOk;
  }

  /**
   * Return the value associated with the column: AUTODRAWERPULLENABLE
   */
  public java.lang.Boolean isAutoDrawerPullEnable() {
    return autoDrawerPullEnable == null ? Boolean.FALSE : autoDrawerPullEnable;
  }

  /**
   * Set the value related to the column: AUTODRAWERPULLENABLE
   *
   * @param autoDrawerPullEnable the AUTODRAWERPULLENABLE value
   */
  public void setAutoDrawerPullEnable(java.lang.Boolean autoDrawerPullEnable) {
    this.autoDrawerPullEnable = autoDrawerPullEnable;
  }

  /**
   * Return the value associated with the column: DRAWER_PULL_HOUR
   */
  public java.lang.Integer getDrawerPullHour() {
    return drawerPullHour == null ? Integer.valueOf(0) : drawerPullHour;
  }

  /**
   * Set the value related to the column: DRAWER_PULL_HOUR
   *
   * @param drawerPullHour the DRAWER_PULL_HOUR value
   */
  public void setDrawerPullHour(java.lang.Integer drawerPullHour) {
    this.drawerPullHour = drawerPullHour;
  }

  /**
   * Return the value associated with the column: DRAWER_PULL_MIN
   */
  public java.lang.Integer getDrawerPullMin() {
    return drawerPullMin == null ? Integer.valueOf(0) : drawerPullMin;
  }

  /**
   * Set the value related to the column: DRAWER_PULL_MIN
   *
   * @param drawerPullMin the DRAWER_PULL_MIN value
   */
  public void setDrawerPullMin(java.lang.Integer drawerPullMin) {
    this.drawerPullMin = drawerPullMin;
  }

  /**
   * Return the value associated with the column: CNAME
   */
  public java.lang.String getCurrencyName() {
    return currencyName;
  }

  /**
   * Set the value related to the column: CNAME
   *
   * @param currencyName the CNAME value
   */
  public void setCurrencyName(java.lang.String currencyName) {
    this.currencyName = currencyName;
  }

  /**
   * Return the value associated with the column: GRATUITYRATE
   */
  public java.lang.Double getGratuityRate() {
    return gratuityRate == null ? Double.valueOf(0) : gratuityRate;
  }

  /**
   * Set the value related to the column: GRATUITYRATE
   *
   * @param gratuityRate the GRATUITYRATE value
   */
  public void setGratuityRate(java.lang.Double gratuityRate) {
    this.gratuityRate = gratuityRate;
  }

  /**
   * Return the value associated with the column: CSYMBOL
   */
  public java.lang.String getCurrencySymbol() {
    return currencySymbol;
  }

  /**
   * Set the value related to the column: CSYMBOL
   *
   * @param currencySymbol the CSYMBOL value
   */
  public void setCurrencySymbol(java.lang.String currencySymbol) {
    this.currencySymbol = currencySymbol;
  }

  public boolean equals(Object obj) {
    if (null == obj) {
      return false;
    }
    if (!(obj instanceof com.floreantpos.model.Restaurant)) {
      return false;
    } else {
      com.floreantpos.model.Restaurant restaurant = (com.floreantpos.model.Restaurant) obj;
      if (null == this.getId() || null == restaurant.getId()) {
        return false;
      } else {
        return (this.getId().equals(restaurant.getId()));
      }
    }
  }

  public int hashCode() {
    if (Integer.MIN_VALUE == this.hashCode) {
      if (null == this.getId()) {
        return super.hashCode();
      } else {
        String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
        this.hashCode = hashStr.hashCode();
      }
    }
    return this.hashCode;
  }

  public int compareTo(Object obj) {
    if (obj.hashCode() > hashCode()) {
      return 1;
    } else if (obj.hashCode() < hashCode()) {
      return -1;
    } else {
      return 0;
    }
  }

  public String toString() {
    return super.toString();
  }

}
